package com.fnzn.entranceGuard.entity.power;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author sxf
 * @since 2019-01-03
 */
@Data
@TableName("power_day")
public class PowerDay extends Model<PowerDay> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @TableField("device_id")
    private String deviceId;
    @TableField("power_id")
    private String powerId;
    /**
     * 年 2019
     */
    private Integer year;
    /**
     * 月份 01
     */
    private Integer month;
    /**
     * 日 01
     */
    private Integer day;
    /**
     * 用电量 kwh
     */
    private BigDecimal power;
    /**
     * 最大功率
     */
    @TableField("max_power")
    private Integer maxPower;
    /**
     * 最小功率
     */
    @TableField("min_power")
    private Integer minPower;
    @TableField("create_time")
    private Date createTime;
    @TableField("update_time")
    private Date updateTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "PowerDay{" +
        ", id=" + id +
        ", year=" + year +
        ", month=" + month +
        ", day=" + day +
        ", power=" + power +
        ", maxPower=" + maxPower +
        ", minPower=" + minPower +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        "}";
    }
}
